﻿/// <reference path="../../../extjs/ext-all-debug.js" />
Ext.define('yzmh.view.collect.52tian', {
    extend: 'Ext.Panel',
    alias: 'widget.52tian',
    closable: true,
    title: '',
    layout: 'border',
    tbar: [
        { xtype: 'tbfill' }, { action: 'checkComic', text: '检测漫画', icon: 'extjs/icons/book_link.png' }, "-", { action: 'importComic', text: '导入漫画', icon: 'extjs/icons/book_add.png' },"-", { action: 'importChapter', text: '导入章节', icon: 'extjs/icons/page_add.png' }
    ],
    items: [{
        xtype:'grid',
        store: 'collect.52tian',
        loadMask: true,
        columnLines: true,
        forceFit: true,
        region: 'center',
        sortableColumns: false,
        verticalScrollerType: 'paginggridscroller',
        invalidateScrollerOnRefresh: false,
        viewConfig: {
            trackOver: false,
            stripeRows: true
        },
        selType: 'rowmodel',
        selModel: Ext.create("Ext.selection.RowModel", {
            mode: 'SINGLE',
            pruneRemoved: false
        }),
        columns: [{
            xtype: 'rownumberer'
            },
            { header: '漫画名称', dataIndex: 'mhmc'},
            { header: '作者', dataIndex: 'zzmc', width: 40 },
            {
                header: '章节', dataIndex: 'zjmc', width: 50
            },
            { header: '更新时间', dataIndex: 'time', align: 'center', width: 60 },
            {
                header: '漫画地址', dataIndex: 'mhurl', width: 60
            },
            {
                action: 'view',
                xtype: 'actioncolumn',
                width: 20,
                header: '预览',
                align: 'center',
                icon: 'extjs/icons/page_link.png'
            },
            {
                header: '存在',
                width: 20,
                align: 'center',
                dataIndex: 'exist',
                xtype: 'booleancolumn',
                trueText: '是',
                falseText: '否'
            }
        ]
    }, {
        xtype: 'panel',
        layout: 'vbox',
        region: 'east',
        border: false,
        hidden: true,
        items: [{
            xtype: 'propertygrid',
            width: 300,
            source: {}
        }, {
            name: 'chaptergrid',
            xtype: 'grid',
            width: 300,
            flex: 1,
            columnLines: true,
            forceFit: true,
            store: {
                stype: 'store',
                model: 'yzmh.model.Chapter'
            },
            selType: 'rowmodel',
            selModel: Ext.create("Ext.selection.RowModel", {
                mode: 'MULTI'
            }),
            columns: [
                { header: '名称', dataIndex: 'zjmc', width: 50 },
                {
                    header: '地址', dataIndex: 'zjurl'
                }]
        }]
    }]
});

